<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE html>

<html>

	<head>

		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

		<title>仪器共享</title>

		<meta name="keywords" content="科研仪器，生命科学仪器，环境检测仪器，实验常用设备，分析仪器">

		<meta name="description" content="中国领先的科研仪器共享平台，让您快速找到各种类型的科学研究仪器。提升闲置仪器利用率，产生更大科研价值。涵盖：生命科学仪器、环境检测仪器、实验常用设备、分析仪器、仪表、物性测试、测量/计量仪器、在线及过程控制仪器。

">
		<!--<link rel="stylesheet" href="new_css/header_footer.css?t=1">-->
		<link rel="stylesheet" href="new_css/publishService.css">
		<link rel="stylesheet" href="css/new_style.css">
		<link rel="stylesheet" href="css/reset.css">
		<link rel="stylesheet" href="css/common.css">
		<script src="new_js/jquery-1.11.3.js"></script>
		<style>
			.mainList .content .right .title{
				margin-left: 30px;
			}
			.main-content-mid {
				/*margin-left: 40px;*/
			}
			.mainList .content    {
				width: 100%;
				overflow: hidden;
				 height: 100% !important;
			}
			.mainList .content .right{
				height: 100% !important;
			}


			/*小箭头*/

			.sun_item>.sun_item_div1:after, .sun_item>.sun_item_div1:before {
				border: solid transparent;
				content: '';
				height: 0;
				left: 100%;
				position: absolute;
				width: 0;
			}
			.sun_item>.sun_item_div1:before {
				border-width: 12px;
				border-left-color: rgba(196,196,196,1);
				top: 75px;
			}
			.sun_item>.sun_item_div1:after {
				border-width: 10px;
				border-left-color: #fff;
				top: 77px;
			}


			/*goods-comm-stars style*/
			.goods-comm{height:41px;position:relative;z-index:7;}
			.goods-comm-stars{line-height:25px;height:41px;position:absolute;top:0px;left:0;width:400px;}
			.goods-comm-stars .star_l{float:left;display:inline-block;margin-right:5px;display:inline;}
			.goods-comm-stars .star_choose{float:left;display:inline-block;}

			.goods-comm{height:41px;position:relative;z-index:7;}
			.goods-comm-stars1{line-height:25px;height:41px;position:absolute;top:0px;left:0;width:400px;}
			.goods-comm-stars1 .star_l{float:left;display:inline-block;margin-right:5px;display:inline;}
			.goods-comm-stars1 .star_choose{float:left;display:inline-block;}
			/* rater star */
			.rater-star{position:relative;list-style:none;margin:0;padding:0;background-repeat:repeat-x;background-position:left top;float:left;}
			.rater-star-item, .rater-star-item-current{position:absolute;top:0;left:0;background-repeat:repeat-x;}
			.rater-star-item-hover{position:absolute;top:0;left:0;background-repeat:repeat-x; z-index: 999 !important;}
			.rater-star-item{background-position: -100% -100%;}
			.rater-star-item-hover{background-position:0 -48px;cursor:pointer;}
			.rater-star-item-current{background-position:0 -48px;cursor:pointer;}
			.rater-star-item-current.rater-star-happy{background-position:0 -25px;}
			.rater-star-item-hover.rater-star-happy{background-position:0 -25px;}
			.rater-star-item-current.rater-star-full{background-position:0 -72px;}
			/* popinfo */
			.popinfo{display:none;position:absolute;top:30px;background:url(images/infobox-bg.gif) no-repeat;padding-top:8px;width:192px;margin-left:-14px;}
			.popinfo .info-box{border:1px solid #f00;border-top:0;padding:0 5px;color:#F60;background:#FFF;}
			.popinfo .info-box div{color:#333;}
			.rater-click-tips{font:12px/25px;color:#333;margin-left:10px;background:url(images/infobox-bg-l.gif) no-repeat 0 0;width:151px;height:34px;padding-left:16px;overflow:hidden;}
			.rater-click-tips span{display:block;background:#FFF9DD url(images/infobox-bg-l-r.gif) no-repeat 100% 0;height:34px;line-height:34px;padding-right:5px;}
			.rater-star-item-tips{background:url(images/star-tips.gif) no-repeat 0 0;height:41px;overflow:hidden;}
			.cur.rater-star-item-tips{display:block;}
			.rater-star-result{color:#FF6600;font-weight:bold;padding-left:10px;float:left;}



			/*评论*/
			.commentary{
				width:935px;
				height:402px;
				border: 1px solid #C4C4C4;
			}
			.commentary .buyer-evaluation{
				width: 467px;
				border-right: 1px solid #d2d2d2;




			}
			.commentary .buyer-evaluation .buyer-evaluation-title{
				height: 41px;
				line-height: 41px;
				margin: 8px auto;
				text-align: center;


				/*border-bottom: 1px solid #d2d2d2;*/

			}
			.commentary .buyer-evaluation .buyer-evaluation-title p{
				padding-bottom: 8px;
				border-bottom: 1px solid #d2d2d2;
				color: #1A1A1A;
				font-size:16px;
				/**/
			}




			.buyer-evaluation-content ul li span{
				color: #FF8A00;
			}

			.mainList .content .right ul li label {
				width: 100px;
				display: inline-block;
				/*text-align: right;*/
				padding-right: 20px;
			}
			.mainList .content .right ul .item11 select {
				height: 54px;
				width: 477px;
			}

			.mainList .content .right ul .item4 textarea {
				width: 468px;
				height: 183px;
				vertical-align: middle;
			}


			.mainList .content .title {
				width: 100%;
				height: 47px;
				border-bottom: 1px solid #d3d3d3;
				line-height: 44px;
				font-size: 18px;
				color: #202020;
				margin: 20px auto;
			}

			.mainList .content .title-bot{
				width: 100%;
				height: 47px;
				line-height: 44px;
				font-size: 16px;
				color: #202020;
				margin: 20px 0px 20px 30px;
			}

			.mainList .content .title span {
				display: inline-block;
				height: 100%;
				border-bottom: 2px solid #ff8a00;
			}
			.sun_item>.sun_item_div2 {
				display: inline-block;
				float: left;
				width: 989px;
				height: 172px;
				padding: 0 60px;
				border: none;
				border-bottom: 1px solid rgba(196,196,196,1);
				border-left: 1px solid rgba(196,196,196,1);
			}

			.biaodan {
				margin-left: 30px;
			}
			.service-bar{
				width: 100%;
				max-width: 1198px;
				height: 36px;
				background-color: #EDEDED;
			}
			.service-bar ul li {
				display: inline-block;
				line-height: 36px;
				width: 560px;
				padding-left: 30px;
			}

			.service-left{
				/*width: 597px;*/
				width: 100%;
				height: 120px;
			}
			.service-item{
				/*width:800px;*/
				width: 96%;
				height: 100px;
				margin: 20px 0 20px 20px;
			}
			.service-item .service-item-img img{
				width: 90px;
				height: 90px;
				border: 1px solid #efefef;
				margin: 0px 20px 0px 10px;
			}
			/*字数限制*/
			.service-item .service-item-content ul li{
				overflow: hidden; /*自动隐藏文字*/
				text-overflow: ellipsis;/*文字隐藏后添加省略号*/
				white-space: nowrap;/*强制不换行*/
				width: 57em;/*不允许出现半汉字截断*/
			}
			.service-item .service-item-content .money-color-style{
				color: #ED1717;
				font-size:18px;
			}


			.main-content-mid{
				margin: 30px;
				/*width: 550px;*/
				width: 95%;
			}
			/*.main-content-mid ul li{*/
				/*display: inline-block;*/
				/*width: 270px;*/
			/*}*/
			/*.special{*/
				/*display: block !important;*/
				/*width: 500px !important;*/
			/*}*/


			a.clearfix.fr.commentary-btn {
				/* width: 151px; */
				/* height: 46px; */
				width: 190px;
				height: 64px;
				line-height: 64px;
				background-color: #ff8a00;
				text-align: center;
				color: #fff;
				font-size: 18px;
				/* float: left; */
				/* margin-left: 155px; */
				/* border-radius: 5px; */
			}
			.commentaryBtn.clearfix {
				width: 1200px;
				margin: 0 auto;
				text-align: center;
				margin-top: 30px;
			}

			a.commentaryBtnA {
				width: 190px;
				height: 64px;
				background: #F7843C;
				display: inline-block;
				line-height: 64px;
				font-size: 18px;
				color: #fff;
				cursor: pointer;
			}
			a.commentaryBtnB {
				width: 188px;
				height: 62px;
				background: #fff;
				display: inline-block;
				line-height: 64px;
				font-size: 18px;
				color: #202020;
				margin-right: 10px;
				border: 1px solid #D3D3D3;
				cursor: pointer;
			}
			.dropdown-select{
				margin-top: 20px;
			}

			.commentary-person{
				height: 100%;
			}
			.commentary-item{
				height: 60px;
				margin-top: 20px;
			}
			.commentary-content{
				display: inline-block;
				overflow: hidden; /*自动隐藏文字*/
				text-overflow: ellipsis;/*文字隐藏后添加省略号*/
				white-space: nowrap;/*强制不换行*/
				width: 70em;/*不允许出现半汉字截断*/
				padding-left: 30px;


			}
			.commentary-time{
				display: block;
				text-align: right;
				padding-right: 20px;
				border-bottom: 1px solid #efefef;
			}
			label{
				margin: 0px;
				padding: 0px;
				border: 0px;
				width: 9% !important;
				padding-right: 0px !important;
			}
			.special{
				color: #FF8A00;
			}


.mainList .content .right {
    width: 1158px;
    /* float: right; */
    height: 100%;
    min-height: 1000px;
    padding: 0 20px;
    border: 1px solid #d3d3d3;
}



		</style>

	<%@include file="/header3.jsp"%>
	

	<div class="mainList" id="mainL">
			<div class="bNav">您的位置：用户中心 > <span>订单详情</span></div>
			<div class="content">

				<div class="right">
					<div class="title"><span>订单详情</span></div>
					<!-- <p class="title-bot">对服务进行评价</p> -->

					<!--服务标题栏-->
					<div class="service-bar">
						<ul>
							<li>服务名称</li>
						</ul>
					</div>

					

					<!--栏目左右布局-->
					<div class="service-left">
						<div class="service-item clearfix">
							<div class="service-item-img fl">
								<img src="images/productDetailPic.png">
							</div>
							<div class="service-item-content fl">
								<ul>
									<li>高内涵筛选系统高内涵筛选系统高内涵筛选系统高内涵筛</li>
									<li>服务结果获取时间：<span>2018-5-14</span></li>
									<li class="money-color-style">¥260元/起</li>
								</ul>
							</div>
						</div>

					</div>

					<!--服务标题栏-->
					<div class="service-bar clearfix">
						<ul>
							<li>预约信息</li>
						</ul>
					</div>
					<div class="main-content-mid clearfix">
						<p><span>需求描述：</span>多重PCR（(multiplex PCR），又称多重引物PCR或复合PCR，指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物指在同一PCR反应体系里加上两对以上引物</p>
					</div>


					<!--服务标题栏-->
					<div class="service-bar clearfix">
						<ul>
							<li>联系人信息</li>
						</ul>
					</div>

					<!---->

					<div class="main-content-mid contacts-info clearfix">
						<ul>
							<li><label>联系人姓名：</label> <span>张三</span></li>
							<li><label>所属机构：</label> <span>记忆闯闯科技有限公司</span></li>
							<li><label>联系人电话：</label> <span>185236859741</span></li>
							<li><label>邮箱：</label> <span>105418536589@qq.com</span></li>
						</ul>
					</div>



					<!--服务标题栏-->
					<div class="service-bar clearfix">
						<ul>
							<li>订单信息</li>
						</ul>
					</div>

					<!---->

					<div class="main-content-mid contacts-info clearfix">
						<ul>
							<li><label>订单状态：</label> <span class="special">待支付</span></li>
						</ul>
					</div>



				</div>


			</div>

			<div class="commentaryBtn clearfix" >
				<a class="commentaryBtnB">取消订单</a>
				<a class="commentaryBtnA">支付</a>
			</div>
	</div>


	<!--footer-->
	<%@include file="/footer.jsp"%>
	<script src="js/jquery-1.11.3.js"></script>
	<script src="js/common.js"></script>
	<script>
        $(function() {
            $('.service-good ul li').click(function(){

                // $(this).addClass('selected').siblings().removeClass('selected');
                //hasClass检查第一个元素是否包含 selected 类
                // console.log($(".service-good ul li").text())

				if($(this).hasClass('selected')){
                    $(this).removeClass('selected');
                    var index = $('.selected').text();
                    $("#textareaVal").html(index);
                }else{
                    $(this).addClass('selected');
                    var index = $('.selected').text();
                    $("#textareaVal").html(index);
                }
                // console.log($('.selected').text());
            });
        });
		
	</script>

	<script type="text/javascript">
        $(function(){
            $(".service-good ul li").click(function(){
                var m =""
                for(var i=0;i<$(".selected").text().length;i++){
                    if(i%5==0 && i!=0){
                        m =m+","+$(".selected").text()[i];
                    }else{
                        m =m+$(".selected").text()[i];
                    }
                }
                $("#textareaVal").html(m)
            })
        })



	</script>
	<style>
	.mainList .content .right {
	width:1157px;
/* 	float:right; */
	height:100%;
	min-height: 1000px;
	padding:0 20px;
	border:1px solid #d3d3d3;
}
	</style>
	<script>
		$(function(){
				var oid = ${param.soid};
				$.ajax({
				url :Server + "/rel/ssi/disServOrder",
 				//url :"http://localhost/rel/ssi/disServOrder",
				data : {
					serviceId:${param.serviceId},
    				oid: oid,
    				uid:$("#useridoflogin").val()
				},
				type : "POST",
				dataType: "JSON",
				success : function(data) {
				var html = "";
					var item = "";
					var pattern = '<div class="bNav">您的位置：用户中心 > <span>订单详情</span></div>'
			+'<div class="content">'
			+'	<div class="right">'
			+'		<div class="title"><span>订单详情</span></div>'
				
					<!--服务标题栏-->
				+'	<div class="service-bar">'
				+'		<ul>'
				+'			<li>服务名称</li>'
				+'		</ul>'
				+'	</div>'
					<!--栏目左右布局-->
				+'	<div class="service-left">'
					+'	<div class="service-item clearfix">'
					+'		<div class="service-item-img fl">'
					+'			<img src="#9">'
					+'		</div>'
				+'			<div class="service-item-content fl">'
					+'			<ul>'
				+'					<li>#0</li>'
				+'					<li>服务结果获取时间：<span>#7</span></li>'
				+'					<li class="money-color-style">¥#1#10</li>'
				+'				</ul>'
				+'			</div>'
				+'		</div>'
				+'	</div>'

					<!--服务标题栏-->
				+'	<div class="service-bar clearfix">'
				+'		<ul>'
				+'			<li>预约信息</li>'
				+'		</ul>'
				+'	</div>'
				+'	<div class="main-content-mid clearfix">'
				+'		<p><span>需求描述：</span>#2</p>'
				+'	</div>'


					<!--服务标题栏-->
				+'	<div class="service-bar clearfix">'
				+'		<ul>'
				+'			<li>联系人信息</li>'
				+'		</ul>'
				+'	</div>'
				+'	<div class="main-content-mid contacts-info clearfix">'
				+'		<ul>'
				+'			<li><label>联系人姓名：</label> <span>#3</span></li>'
				+'			<li><label>所属机构：</label> <span>#4</span></li>'
				+'			<li><label>联系人电话：</label> <span>#5</span></li>'
				+'			<li><label>邮箱：</label> <span>#6</span></li>'
				+'		</ul>'
				+'	</div>'
					<!--服务标题栏-->
				+'	<div id="orderInfo" class="service-bar clearfix">'
					+'	<ul>'
					+'		<li>订单信息</li>'
				+'		</ul>'
				+'	</div>'
				+'	<div id="orderStatus" class="main-content-mid contacts-info clearfix">'
				+'		<ul>'
				+'			<li id="statusLi"><label>订单状态：</label> <span class="special">#8</span></li>'
				+'		</ul>'
			+'		</div>'
			+'</div>'
			+'</div>'
			+'<div class="commentaryBtn clearfix" id="Choosecheck" >'
			+'</div>';
				
						Status = "";
						Status1 = "";
						switch (data.ssiDo.appointOrder.status) {
						case 0:
							Status = "预约中";
							Status1 = "";
							break;
						case 1:
							Status = "预约成功";
							Status1 = "支付";
							break;
						case 2:
							Status = "已支付";
							Status1 = "实验";
							break;
						case 3:
							Status = "等待结果上传";
							Status1 = "";
							break;
						case 4:
							Status = "等待确认";
							Status1 = "确认";
							break;
						case 5:
							/* Status = "已实验";
							Status1 = "评价"; */
							if(data.ssiDo.appointOrder.rate==1||data.ssiDo.appointOrder.rate==3){
								Status = "已评价";
								Status1 = "";
							}else if(data.ssiDo.appointOrder.rate==2||data.ssiDo.appointOrder.rate==0){
								Status = "未评价";
								Status1 = "评价";
							}
							break;
						case 6:
							/* if(data.ssiDo.appointOrder.rate==1||data.ssiDo.appointOrder.rate==3){
								Status = "已评价";
								Status1 = "";
							}else if(data.ssiDo.appointOrder.rate==2||data.ssiDo.appointOrder.rate==0){
								Status = "已实验";
								Status1 = "评价";
							} */
							Status = "交易关闭";
							Status1 = "";
							break;
						/* case 7:
							Status = "交易关闭";
							Status1 = "";
							break; */
						}
						var getTime = new Date();
							item = pattern	
								.replace("#0", data.ssiDo.serviceName)//服务名
								.replace("#1", data.ssiDo.serviceFee)//费用
								.replace("#2", data.ssiDo.appointOrder.message)//
								.replace("#3", data.consumeUser.realname)//
								.replace("#4", data.consumeUser.unitName) //
								.replace("#5", data.consumeUser.mobile)//
								.replace("#6", data.consumeUser.emaile)//
								.replace("#7", timestampToTime(getTime.setDate(getTime.getDate() + data.ssiDo.getTime)))//结果获取时间
								.replace("#8", Status)//交易状态
								.replace("#9", data.ssiDo.ssimagelist[0].imagePath)//
								.replace("#10", data.ssiDo.unit)//
								//订单id
							html += item;

					$("#mainL").html(html);
					if(data.ssiDo.appointOrder.status==1){
							var htm = 
							'<a class="commentaryBtnB" id="cancel" onclick="cancelOrder(${param.soid})">取消订单</a>'
							+'<a class="commentaryBtnA" id="pay" >支付</a>';
							$("#Choosecheck").html(htm);
							
							$("#pay").click(function(){
							//支付按钮
								
							});
					}else if(data.ssiDo.appointOrder.status==2){
						var htm ='<a class="commentaryBtnA" >实验</a>'
						$("#Choosecheck").html(htm);
					}else if(data.ssiDo.appointOrder.status==4){
						var htm ='<a class="commentaryBtnA" >确认</a>'
						$("#Choosecheck").html(htm);
					}
					if(GetUrlByParamName("display")=="false"){
						$("#Choosecheck").remove();
					} 
					if(data.ssiDo.appointOrder.status>2){
							var htm = '<li><label>订单编号：</label> <span>'+data.ssiDo.appointOrder.number+'</span></li>'+
							'<li><label>付款时间：</label> <span>'+new Date(data.ssiDo.appointOrder.paymentTime).Format("yyyy-MM-dd hh:mm:ss")+'</span></li>'+
							'<li><label>支付宝交易号：</label> <span>暂无</span></li>';
							$("#statusLi").before(htm);
					}
					var myComment="";
					var mngComment="";
					var soComment="";
					var imgHtml="";
					var resultHtml="";
					if(data.resultDO!=null){
						var time=new Date(data.resultDO.uploadTime).Format("yyyy-MM-dd");
						resultHtml='<div class="service-bar clearfix">'+
									'<ul>'+
										'<li>服务结果</li>'+
									'</ul>'+
								'</div>'+
								'<div id="resultDiv" class="main-content-mid contacts-info clearfix">'+
									'<ul>'+
										'<li><label>附件：</label><a href='+data.resultDO.resultUrl+'>查看附件</a></li><li><label>时间：</label><span>'+time+'<span></li>'+
										'<li><label>填写人：</label><span>'+data.resultDO.uploadName+'</span></li>'+
										'<li><label>结果描述：</label><span>'+data.resultDO.resultDescribe+'</span>'+
										'</li>'+
									'</ul>'+
								'</div>';
					}
					if(data.myComment!=null){
						if(data.myComment.commentImageDOs!=null){
							for(i=0;i<data.myComment.commentImageDOs.length;i++){
								imgHtml=imgHtml+"<img src="+data.myComment.commentImageDOs[i].imgPath+">"
							}
						}
						myComment='<div class="service-bar clearfix">'+
									'<ul>'+
										'<li>评价信息</li>'+
									'</ul>'+
								'</div>'+
								'<div class="main-content-mid contacts-info clearfix">'+
									'<ul>'+
										'<li id="myComment"><label>'+data.myComment.content+'</label></li>'+
									'</ul>'+
								'</div>';
						soComment=soComment+myComment;
					}
					if(data.mngComment!=null){
						var managerComment='<div class="service-bar clearfix">'+
									'<ul>'+
										'<li>仪器管理人员评价信息</li>'+
									'</ul>'+
								'</div>'+
								'<div class="main-content-mid contacts-info clearfix">'+
									'<ul>'+
										'<li><label>'+data.mngComment.content+'</label></li>'+
									'</ul>'+
								'</div>';
						soComment=soComment+managerComment;
					}
					$("#orderStatus").after(resultHtml);
					$("#resultDiv").after(soComment);
					$("#myComment").append(imgHtml);
					$(".commentaryBtnA").click(function(){
						if($(this).text()=="完成"){
							var r=confirm("是否完成？");
							if(r==true){
								changeStatus(${param.soid},5);
							}
						}else if($(this).text()=="实验"){
							var r=confirm("是否申请实验？");
							if(r==true){
								changeStatus(${param.soid},3);
							}
						}else if($(this).text()=="支付"){
							var r=confirm("是否支付？");
							if(r==true){
								payorder(${param.soid});
								/* changeStatus(${param.soid},2); */
							}
						}else if($(this).text()=="确认"){
							var r=confirm("是否确认？");
							if(r==true){
								changeStatus(${param.soid},5);
							}
						}
		            })
					
					function payorder(){
		            	data.ssiDo.appointOrder.createTime = new Date(data.ssiDo.appointOrder.createTime).Format("yyyy-MM-dd hh:mm:ss")
		            	var orderMeg = [];
		            	orderMeg.push(data.ssiDo.appointOrder);
		            	orderMeg.push({"oid":${param.soid}});
		            	orderMeg.push({"serviceName":data.ssiDo.serviceName,"serviceId":data.ssiDo.serviceId});
						var xhr = new XMLHttpRequest();
						xhr.open("POST", "/Instrument/PayApiByServiceServlet",true)
						xhr.send(JSON.stringify(orderMeg));
						xhr.onload = function(){
							if (this.status == 200) {
								window.location.href = this.response;
							}
						}
		            }
					
				}
			});
		});
		
		
		
		Date.prototype.Format = 
			function(fmt){
			var o = {
				"M+": this.getMonth() + 1, //月份 
       			"d+": this.getDate(), //日 
        		"h+": this.getHours(), //小时 
        		"m+": this.getMinutes(), //分 
        		"s+": this.getSeconds(), //秒 
        		"q+": Math.floor((this.getMonth() + 3) / 3), //季度 
        		"S": this.getMilliseconds() //毫秒 
			};
			if(/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
			for(var k in o)
			if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
    		return fmt;
		}
		function cancelOrder(oid){
			$.ajax({
			//url : "http://localhost/rel/ssi/cancelSO",
 			url : Server +"/rel/ssi/cancelSO",
			data : {
				"oid" : oid,
			},
			type : "POST",
			dataType : "text",
			success : function(data) {
				alert(data);
				window.location.reload();
			}
			});
		}
		
		 function changeStatus(id,status){
			$.ajax({
 				url :Server + "/orderRelevant/changeStatus",
				//url :"http://localhost/orderRelevant/changeStatus",
				data : {
					"id":id,
					"status":status
				},
				type : "POST",
				//dataType: "JSON",
				success : function(data) {
					if(data=="修改成功"){
						alert("操作成功");
						window.location.href="new_file3";
					}
				},
			});	
		}
		
		function GetUrlByParamName(name) {
	  			 var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
	 			 var URL =  decodeURI(window.location.search);
	  			 var r = URL.substr(1).match(reg);
	 			 if(r!=null){
	 		        //decodeURI() 函数可对 encodeURI() 函数编码过的 URI 进行解码
	 		         return decodeURI(r[2]);
	  			 };
	  		     return null;
	 		};
	</script>
	</body>

</html>